int zepto_errno = 0;

static char *error_descs[] = {
  //ZEPTO_SUCCESS
  "success",
  //struct zeptoOK_PARSEERROR
  "tokenizer failed while parsing",
  //struct zeptoOK_MALFORMED_NUM
  "malformed numeric token",
  //struct zeptoOK_ENOMEM
  "insufficient memory while tokenizing",
  //struct zeptoOK_UNEXPECTED_EOF
  "unexpedted eof while tokenizing",
  //struct zeptoOK_MISMATCHED_PAREN
  "mismatched parenthesis while tokenizing",
  //struct zeptoOK_INVALID_SEQ
  "invalid sequence while tokenizing",
  //ZEPTO_EXPR_INCOMPLETE
  "incomplete s-expression",
  //ZEPTO_EXPR_ENOMEM
  "insufficient memory while parsing expression",
  //ZEPTO_EXPR_UNEXPECTED_TOKEN
  "unexpected token while parsing expression",
};

static int num_errors = sizeof(error_descs) / sizeof(char*);

char* get_error_string(int errnum)
{
  if(errnum < 0 || errnum > num_errors - 1) {
    return "unknown error";
  }
  return error_descs[errnum];
}
